	<div class="row">
	    <div class="col-xs-12">
	        <div class="box">
	            <div class="box-header">
	                <h3 class="box-title">Detail Klaim Obat ABHP</h3>
	            </div><!-- /.box-header -->
	            <div class="box-body table-responsive">
						<?php
							if(!empty($list)){
						?>
					<table class="table table-borderless table-condensed">
							<tr>
								<th width="15%">Kode Klaim</th>
								<td width="35%">: <?=$list['klaim']?></td>
								<th width="15%">Jenis Kunjungan</th>
								<td width="35%">: <?=$list['jenis_kunjungan']?></td>
							</tr>
							<tr>
								<th width="15%">No.Register</th>
								<td width="35%">: <?=$list['peserta']?></td>
								<th width="15%">Tanggal Masuk</th>
								<td width="35%">: <?=tgl($list['tgl_masuk'])?></td>
							</tr>
							<tr>
								<th width="15%">Nama</th>
								<td width="35%">: <?=$list['nama']?></td>
								<th width="15%">Tanggal Keluar</th>
								<td width="35%">: <?=tgl($list['tgl_keluar'])?></td>
							</tr>
							<tr>
								<th width="15%">Jenis Kelamin</th>
								<td width="35%">: 
								<?php if($list['jk']=="L"){
									echo "Laki-laki";
									}else{
										echo "Perempuan";
									}
										?>
								</td>
								<th width="15%">LOS</th>
								<td width="35%">: <?=$list['lama']." Hari"?></td>
							</tr>
							<tr>
								<th width="15%">Tempat, Tanggal Lahir</th>
								<td width="35%">: <?=$list['tempat_lahir'].", ".tgl_saja($list['tgl_lahir'])?></td>
								<th width="15%">Diagnosa Awal</th>
								<td width="35%">: <?=$list['diagnosa_lain']?></td>
							</tr>
							<tr>
								<th width="15%">Tanggal Transaksi</th>
								<td width="35%">: <?= tgl($list['tgl_transaksi'])?></td>
								<th width="15%">No. DMK</th>
								<td width="35%">: <?= $list['DMK'];?></td>
							</tr>
							<tr>
								<th width="15%">Unit</th>
								<td width="35%">: <?= $list['unit']?></td>
								<th width="15%">Dokter</th>
								<td width="35%">: <?= $list['dokter'];?></td>
							</tr>
					</table>

	                <div class="clearfix" style="margin-top:20px;"></div>
					<h4>Obat &amp; ABHP</h4>
	                <table class="table table-striped table-bordered table-condensed">
	                	
	                	<thead>
							<tr>
								<th width="5%">#</th>			
								<th width="25%">Obat/ABHP</th>			
								<th width="15%">Tarif Perda</th>			
								<th width="5%">Jumlah</th>			
								<th width="15%">Tarif Diminta</th>			
								<th width="18%">Sub Total</th>			
							</tr>
						</thead>
							<?php
						if ($jumlah>0) {
							$total=0;
							$no=1;
							foreach ($klaim_obat as $value) { 
							$subtotal = $value['tarif_diminta']*$value['frekuensi_diminta'];?>
							<tr id="div_<?= $value['id_detail_klaim_obat'] ?>">
								<td><?= $no; ?></td>
								<td><?= $value['obat']." ".$value['merk'] ?></td>
								<td><?= formatRupiahTabel($value['tarif_perda']) ?></td>
								<td align="center"><?= $value['frekuensi_diminta'] ?></td>
								<td><?= formatRupiahTabel($value['tarif_diminta']) ?></td>
								<td><?= formatRupiahTabel($subtotal) ?></td>
							</tr>
							<?php 
							$total=$total+$subtotal;
							$no++;
							} ?>
							<tr>
								<td align="right" colspan="5" style="background:#ddd"><b>Total Obat &amp; ABHP</b></td>
								<td><b><?=formatRupiahTabel($total)?></b></td>
							</tr>
							<tr>
		                		<td align="center" colspan="3"><b>Jasa Portier</b></td>
		                		<td align="center"><?= $jml_portir ?></td>
		                		<td><?= formatRupiahTabel($portir_tarif) ?></td>
		                		<td align="center"><?= $tarif_portir ?></td>
		                	</tr>
		                	<tr>
		                		<td colspan="3" align="center"><b>Jasa Resep</b></td>
		                		<td  align="center"><?= $jml_resep ?></td>
		                		<td><?= formatRupiahTabel($resep_tarif) ?></td>
		                		<td align="center"><?= $tarif_resep ?></td>
		                	</tr>
		                	<tr>
		                		<td colspan="3" align="center"><b>Biaya Pemakaian O<sup>2</sup></b></td>
		                		<td align="center"><?= $jml_oksigen ?></td>
		                		<td><?= formatRupiahTabel($oksigen_tarif) ?></td>
		                		<td align="center"><?= $tarif_oksigen ?></td>
		                	</tr>
							<tr>
								<?php 
								//rumus total semua
								$totalall=$total+$tarif_portir+$tarif_oksigen+$tarif_resep;
								?>
								<td align="right" colspan="5" style="background:#ddd"><b>Total</b></td>
								<td><b><?=formatRupiahTabel($totalall)?></b></td>
							</tr>
							<tr>
								<td align="right" colspan="4"><b>Terbilang</b></td>
								<td align="right" colspan="2"><b><?= ucwords(terbilang($totalall))." Rupiah"?></b></td>
							</tr>
							<?php }else{ ?>
								<tr><td colspan="7" align="center">Tidak ada data</td></tr>
							<?php } ?>
	                </table>
	               
					
						<?php 
							}else{
						?>

	                <table class="table table-striped table-bordered table-hover table-condensed">
							<tr><td colspan="2" align="center">Tidak ada data</td></tr>
					</table>
						<?php 
							}
						?>
					</table>									
	            </div><!-- /.box-body -->
	        </div><!-- /.box -->                            
	    </div>
	</div>